<template>
  <div class="course-item">
    <div class="ci-left-img">
      <img :src="`https://ss.lanqb.com/${course.posters.mobile}`" alt="" />
    </div>
    <div class="ci-right-content">
      <h3>{{ course.title }}</h3>
      <div>
        <div>
          <img :src="`https://ss.lanqb.com/${course.profile.avatar}`" alt="" />
          <span>{{ course.profile.nickname }} </span>
        </div>
        <span>共{{ course.preview_setting.lessons_count }}节</span>
      </div>
      <p>{{ course.study_num }}人在学</p>
    </div>
  </div>
</template>

<script>
export default {
  name: "CourseItem",
  props: ["course"],
  data() {
    return {};
  },
  methods: {},
};
</script>

<style lang="scss" scoped>
.course-item {
  width: 378px;
  height: 124px;
  margin-top: 17px !important;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  > .ci-left-img {
    width: 165px;
    height: 124px;
    img {
      width: 100%;
      height: 100%;
      border-radius: 5px;
    }
  }
  .ci-right-content {
    width: 195px;
    height: 124px;
    margin-left: 12px;
    display: flex;
    flex-direction: column;
    h3 {
      font-size: 16px;
      font-weight: 400;
      display: -webkit-box;
      -webkit-box-orient: vertical;
      text-overflow: ellipsis;
      -webkit-line-clamp: 2;
      overflow: hidden;
    }
    > div {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-top: 10px;
      height: 20px;
      > div {
        display: flex;
        align-items: center;
      }
      img {
        width: 20px;
        height: 20px;
        border-radius: 50%;
        margin-right: 5px;
      }
      span {
        font-size: 12px;
      }
    }
    > p {
      font-size: 14px;
      color: #8c8c8c;
      margin-top: 41px;
    }
  }
}
</style>
